package com.e2oto.seller.common.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.e2oto.seller.R;

/**
 * Created by ZhangLiQiang on 2017/8/5.
 */

public class ImageLoader {

    public static void load(Context context, String url, ImageView img) {
        Glide.with(context).load(url).error(R.drawable.load_failure_cude).placeholder(R.drawable.loading_cude).into(img);
    }

    public static void loadCircle(Context context, String url, ImageView img) {
        Glide.with(context).load(url).transform(new GlideCircleTransform(context)).error(R.drawable.loading_failure_circle).placeholder(R.drawable.loading_circle).into(img);
    }
    public static void loadRound(Context context, String url, ImageView img) {
        Glide.with(context).load(url).transform(new GlideRoundTransform(context)).error(R.drawable.load_failure_round).placeholder(R.drawable.loading_round).into(img);
    }
}



